#!/usr/bin/python
# -*- coding: UTF-8 -*-


import json
class Person:
    name = ""
    age = 0

    def __init__(self, name='', age = 0):
        self.name = name
        self.age = age

    def toString(self):
        return json.dumps(self.__dict__)

def main():
    # mapSetAndTraverse()

    getNull()


def mapSetAndTraverse():
    map = {}

    p1 = Person('tul', 34)
    print(p1.toString())
    map.setdefault(str(1), p1)

    for key in map.keys():
        print(key, map.get(key).toString(), sep='=')


def getNull():
    map = {}
    map.setdefault("name", "tul")

    list = ["name", "age"]
    for item in list:
        value = map.get(item)
        if value == None:
            print("None")
        else:
            print(value)

if (__name__ == '__main__'):
    main()